//=============================================================================
// AvatarAssetValue.as
// 
// 
// AUTHOR:            Jay Liang
// 
//                  Copyright (c) 2011 Break Media
//                              All Rights Reserved.
//                          
//=============================================================================
package values.avatar
{
import core.Configuration;

import framework.view.components.graphics.SWF;

public class AvatarAssetValue
{	
	[Data(type="field", mapping="@key")]
	public var key:String;
    
    [Data(type="field", mapping="url")]
    public var baseUrl:String;
	
	public function get url():String
	{
		return Configuration.assetsPath + baseUrl;
	}
	
	[Data(type="field", mapping="classRef")]
	public var classRef:String;
	
	public function get assetMode():String
	{
		var mode:String = SWF.SINGLE;
		if (classRef && classRef != "")
		{
			mode = SWF.EXTERNAL_LIBS;
		}
		return mode;
	}
	
	public function get isSWF():Boolean
	{
		return url.indexOf(".swf") > 0;
	}
}
}


